﻿
using System.ComponentModel.DataAnnotations.Schema;

namespace Company.Database.Entities
{
    /// <summary>
    /// 报警记录实体
    /// </summary>
    [Table(nameof(AlarmEntity))]
    public class AlarmEntity : EntityBase
    {
        private int roomNumber = -1;
        /// <summary>
        /// 房间号
        /// </summary>
        public int RoomNumber
        {
            get { return roomNumber; }
            set { SetProperty(ref roomNumber, value); }
        }

        private string addressNumber = string.Empty;
        /// <summary>
        /// 地址号 格式如 27.00   或 27.01
        /// </summary>
        public string AddressNumber
        {
            get { return addressNumber; }
            set { SetProperty(ref addressNumber, value); }
        }

        private string message = string.Empty;
        /// <summary>
        /// 报警内容
        /// </summary>
        public string Message
        {
            get { return message; }
            set { SetProperty(ref message, value); }
        }

        private DateTime alarmTime = DateTime.Now;
        /// <summary>
        /// 报警时间
        /// </summary>
        public DateTime AlarmTime
        {
            get { return alarmTime; }
            set { SetProperty(ref alarmTime, value); }
        }

        private DateTime resumeTime = DateTime.Now;
        /// <summary>
        /// 恢复正常时间
        /// </summary>
        public DateTime ResumeTime
        {
            get { return resumeTime; }
            set { SetProperty(ref resumeTime, value); }
        }

        private int status = -1;
        /// <summary>
        /// 报警状态 1表示报警中， 0表示恢复正常是
        /// </summary>
        public int Status
        {
            get { return status; }
            set { SetProperty(ref status, value); }
        }
    }
}
